import 'package:enterprise_v6_app/generated/json/base/json_convert_content.dart';
import 'package:enterprise_v6_app/app/data/entities/double_control/instrumnet_ledger_list_entity.dart';

InstrumnetLedgerListEntity $InstrumnetLedgerListEntityFromJson(Map<String, dynamic> json) {
  final InstrumnetLedgerListEntity instrumnetLedgerListEntity = InstrumnetLedgerListEntity();
  final String? checkStatus = jsonConvert.convert<String>(json['checkStatus']);
  if (checkStatus != null) {
    instrumnetLedgerListEntity.checkStatus = checkStatus;
  }
  final String? checkTime = jsonConvert.convert<String>(json['checkTime']);
  if (checkTime != null) {
    instrumnetLedgerListEntity.checkTime = checkTime;
  }
  final String? companyCode = jsonConvert.convert<String>(json['companyCode']);
  if (companyCode != null) {
    instrumnetLedgerListEntity.companyCode = companyCode;
  }
  final String? controlId = jsonConvert.convert<String>(json['controlId']);
  if (controlId != null) {
    instrumnetLedgerListEntity.controlId = controlId;
  }
  final String? controlName = jsonConvert.convert<String>(json['controlName']);
  if (controlName != null) {
    instrumnetLedgerListEntity.controlName = controlName;
  }
  final String? createBy = jsonConvert.convert<String>(json['createBy']);
  if (createBy != null) {
    instrumnetLedgerListEntity.createBy = createBy;
  }
  final String? createById = jsonConvert.convert<String>(json['createById']);
  if (createById != null) {
    instrumnetLedgerListEntity.createById = createById;
  }
  final String? createDate = jsonConvert.convert<String>(json['createDate']);
  if (createDate != null) {
    instrumnetLedgerListEntity.createDate = createDate;
  }
  final String? deleted = jsonConvert.convert<String>(json['deleted']);
  if (deleted != null) {
    instrumnetLedgerListEntity.deleted = deleted;
  }
  final String? eventId = jsonConvert.convert<String>(json['eventId']);
  if (eventId != null) {
    instrumnetLedgerListEntity.eventId = eventId;
  }
  final String? eventName = jsonConvert.convert<String>(json['eventName']);
  if (eventName != null) {
    instrumnetLedgerListEntity.eventName = eventName;
  }
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    instrumnetLedgerListEntity.id = id;
  }
  final String? instrumentUnit = jsonConvert.convert<String>(json['instrumentUnit']);
  if (instrumentUnit != null) {
    instrumnetLedgerListEntity.instrumentUnit = instrumentUnit;
  }
  final int? lowerLimit = jsonConvert.convert<int>(json['lowerLimit']);
  if (lowerLimit != null) {
    instrumnetLedgerListEntity.lowerLimit = lowerLimit;
  }
  final int? maxUpperLimit = jsonConvert.convert<int>(json['maxUpperLimit']);
  if (maxUpperLimit != null) {
    instrumnetLedgerListEntity.maxUpperLimit = maxUpperLimit;
  }
  final int? minLowerLimit = jsonConvert.convert<int>(json['minLowerLimit']);
  if (minLowerLimit != null) {
    instrumnetLedgerListEntity.minLowerLimit = minLowerLimit;
  }
  final String? objectId = jsonConvert.convert<String>(json['objectId']);
  if (objectId != null) {
    instrumnetLedgerListEntity.objectId = objectId;
  }
  final String? objectName = jsonConvert.convert<String>(json['objectName']);
  if (objectName != null) {
    instrumnetLedgerListEntity.objectName = objectName;
  }
  final String? taskId = jsonConvert.convert<String>(json['taskId']);
  if (taskId != null) {
    instrumnetLedgerListEntity.taskId = taskId;
  }
  final String? taskName = jsonConvert.convert<String>(json['taskName']);
  if (taskName != null) {
    instrumnetLedgerListEntity.taskName = taskName;
  }
  final String? taskRecordId = jsonConvert.convert<String>(json['taskRecordId']);
  if (taskRecordId != null) {
    instrumnetLedgerListEntity.taskRecordId = taskRecordId;
  }
  final String? unitId = jsonConvert.convert<String>(json['unitId']);
  if (unitId != null) {
    instrumnetLedgerListEntity.unitId = unitId;
  }
  final String? unitName = jsonConvert.convert<String>(json['unitName']);
  if (unitName != null) {
    instrumnetLedgerListEntity.unitName = unitName;
  }
  final String? updateBy = jsonConvert.convert<String>(json['updateBy']);
  if (updateBy != null) {
    instrumnetLedgerListEntity.updateBy = updateBy;
  }
  final String? updateById = jsonConvert.convert<String>(json['updateById']);
  if (updateById != null) {
    instrumnetLedgerListEntity.updateById = updateById;
  }
  final String? updateDate = jsonConvert.convert<String>(json['updateDate']);
  if (updateDate != null) {
    instrumnetLedgerListEntity.updateDate = updateDate;
  }
  final int? upperLimit = jsonConvert.convert<int>(json['upperLimit']);
  if (upperLimit != null) {
    instrumnetLedgerListEntity.upperLimit = upperLimit;
  }
  final int? value = jsonConvert.convert<int>(json['value']);
  if (value != null) {
    instrumnetLedgerListEntity.value = value;
  }
  return instrumnetLedgerListEntity;
}

Map<String, dynamic> $InstrumnetLedgerListEntityToJson(InstrumnetLedgerListEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['checkStatus'] = entity.checkStatus;
  data['checkTime'] = entity.checkTime;
  data['companyCode'] = entity.companyCode;
  data['controlId'] = entity.controlId;
  data['controlName'] = entity.controlName;
  data['createBy'] = entity.createBy;
  data['createById'] = entity.createById;
  data['createDate'] = entity.createDate;
  data['deleted'] = entity.deleted;
  data['eventId'] = entity.eventId;
  data['eventName'] = entity.eventName;
  data['id'] = entity.id;
  data['instrumentUnit'] = entity.instrumentUnit;
  data['lowerLimit'] = entity.lowerLimit;
  data['maxUpperLimit'] = entity.maxUpperLimit;
  data['minLowerLimit'] = entity.minLowerLimit;
  data['objectId'] = entity.objectId;
  data['objectName'] = entity.objectName;
  data['taskId'] = entity.taskId;
  data['taskName'] = entity.taskName;
  data['taskRecordId'] = entity.taskRecordId;
  data['unitId'] = entity.unitId;
  data['unitName'] = entity.unitName;
  data['updateBy'] = entity.updateBy;
  data['updateById'] = entity.updateById;
  data['updateDate'] = entity.updateDate;
  data['upperLimit'] = entity.upperLimit;
  data['value'] = entity.value;
  return data;
}

extension InstrumnetLedgerListEntityExtension on InstrumnetLedgerListEntity {
  InstrumnetLedgerListEntity copyWith({
    String? checkStatus,
    String? checkTime,
    String? companyCode,
    String? controlId,
    String? controlName,
    String? createBy,
    String? createById,
    String? createDate,
    String? deleted,
    String? eventId,
    String? eventName,
    String? id,
    String? instrumentUnit,
    int? lowerLimit,
    int? maxUpperLimit,
    int? minLowerLimit,
    String? objectId,
    String? objectName,
    String? taskId,
    String? taskName,
    String? taskRecordId,
    String? unitId,
    String? unitName,
    String? updateBy,
    String? updateById,
    String? updateDate,
    int? upperLimit,
    int? value,
  }) {
    return InstrumnetLedgerListEntity()
      ..checkStatus = checkStatus ?? this.checkStatus
      ..checkTime = checkTime ?? this.checkTime
      ..companyCode = companyCode ?? this.companyCode
      ..controlId = controlId ?? this.controlId
      ..controlName = controlName ?? this.controlName
      ..createBy = createBy ?? this.createBy
      ..createById = createById ?? this.createById
      ..createDate = createDate ?? this.createDate
      ..deleted = deleted ?? this.deleted
      ..eventId = eventId ?? this.eventId
      ..eventName = eventName ?? this.eventName
      ..id = id ?? this.id
      ..instrumentUnit = instrumentUnit ?? this.instrumentUnit
      ..lowerLimit = lowerLimit ?? this.lowerLimit
      ..maxUpperLimit = maxUpperLimit ?? this.maxUpperLimit
      ..minLowerLimit = minLowerLimit ?? this.minLowerLimit
      ..objectId = objectId ?? this.objectId
      ..objectName = objectName ?? this.objectName
      ..taskId = taskId ?? this.taskId
      ..taskName = taskName ?? this.taskName
      ..taskRecordId = taskRecordId ?? this.taskRecordId
      ..unitId = unitId ?? this.unitId
      ..unitName = unitName ?? this.unitName
      ..updateBy = updateBy ?? this.updateBy
      ..updateById = updateById ?? this.updateById
      ..updateDate = updateDate ?? this.updateDate
      ..upperLimit = upperLimit ?? this.upperLimit
      ..value = value ?? this.value;
  }
}
